package com.htfyun.hardware;

import com.htfyun.hardware.reflect.Utils;

public enum HardDiskEnum {

    sda("sda"),
    sdb("sdb"),
    ;
    private final String name;

    private HardDiskEnum(String path) {
        this.name = path;
    }

    public String getName() {
        return name;
    }


    public static String getSerialNumber(HardDiskEnum hardDiskEnum) {
        final String propertyKey = "sys.hd." + hardDiskEnum.getName() + ".serialno";
        return Utils.getSystemProperty(propertyKey);
    }
}
